package com.jt.mapper;

import com.jt.pojo.ItemCat;
import com.jt.pojo.User;
import com.jt.vo.PageResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface UserMapper {
    List<User> findAll();

    @Select("select * from user where username=#{username} and password =#{password}")
    User findUserByUP(User user);

    @Select("select count(1) from user")
    long findTotal();

    List<User> findUserListByPage(@Param("start") int start,@Param("size") int size,@Param("query") String query);

    int updateUserByStatus(User user);

    int saveUser(User user);

    User getUserById(Integer id);

    int updateUser(User user);

    int deleteUserById(User user);

    List<ItemCat> findItemCatList(ItemCat itemCat);
}
